﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace ApproveFlowEngine.Migrations
{
    /// <inheritdoc />
    public partial class EditWorkFlow : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "AuthId",
                table: "Nodes");

            migrationBuilder.DropColumn(
                name: "Description",
                table: "Nodes");

            migrationBuilder.DropColumn(
                name: "Name",
                table: "Nodes");

            migrationBuilder.AddColumn<Guid>(
                name: "ApproverId",
                table: "Nodes",
                type: "char(36)",
                nullable: true,
                collation: "ascii_general_ci");

            migrationBuilder.AddColumn<string>(
                name: "Flies",
                table: "Nodes",
                type: "longtext",
                nullable: false)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "Remark",
                table: "Nodes",
                type: "longtext",
                nullable: false)
                .Annotation("MySql:CharSet", "utf8mb4");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "ApproverId",
                table: "Nodes");

            migrationBuilder.DropColumn(
                name: "Flies",
                table: "Nodes");

            migrationBuilder.DropColumn(
                name: "Remark",
                table: "Nodes");

            migrationBuilder.AddColumn<Guid>(
                name: "AuthId",
                table: "Nodes",
                type: "char(36)",
                nullable: false,
                defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
                collation: "ascii_general_ci");

            migrationBuilder.AddColumn<string>(
                name: "Description",
                table: "Nodes",
                type: "varchar(255)",
                maxLength: 255,
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "Name",
                table: "Nodes",
                type: "varchar(32)",
                maxLength: 32,
                nullable: false,
                defaultValue: "")
                .Annotation("MySql:CharSet", "utf8mb4");
        }
    }
}
